import React from 'react';
import { Provider } from 'mobx-react';
import { Route } from 'react-router';

import ViewCom from './components/View';
import SettingCom from './components/Setting';
import stores from './stores/';
import { WeaLocaleProvider } from 'ecCom';

const getLabel = WeaLocaleProvider.getLabel;

class View extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@eppv3c`} {...stores}><ViewCom ecId={`${this && this.props && this.props.ecId || ''}_ViewCom@qh6a9b`} {...this.props} /></Provider>;
    }
}

class Setting extends React.Component {
    render() {
        return <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@e2wbcy`} {...stores}><SettingCom ecId={`${this && this.props && this.props.ecId || ''}_SettingCom@2w5757`} {...this.props} /></Provider>;
    }
}

module.exports = {
    Route: (
        <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@usvnig`} path="task" component={props => props.children}>
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@c468gf`} path="view" component={View} />
            <Route ecId={`${this && this.props && this.props.ecId || ''}_Route@s81q3m`} path="setting" component={Setting} />
        </Route>
    ),
    com: {
        View,
        Setting,
    },
    titles: {
        'View': getLabel(508745, '门户自定义开发任务元素'),
        'Setting': getLabel(508746, '门户自定义开发任务元素设置'),
    }
};
